Skip to content

London | Emmanuel Gessessew | Module-Structuring-and-Testing-Data | sprint 3| WEEK 3 #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

Emmanuelgessessew
Copy link

Learners, PR Template

Self checklist

  • [ yes] I have committed my files one by one, on purpose, and for a reason
  • [ yes] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • [yes ] I have tested my changes
  • [ yes] My changes follow the style guide
  • [ yes] My changes meet the requirements of this task

Changelist

Briefly explain your PR.
i performed TDD on the given tasks. test then implement

Questions

Ask any questions you have for your reviewer.

@Emmanuelgessessew Emmanuelgessessew added the 👀 Review Git Changes requested to do with Git label Nov 22, 2024
@Emmanuelgessessew Emmanuelgessessew added Complete Volunteer to add when work is complete and review comments have been addressed and removed Complete Volunteer to add when work is complete and review comments have been addressed labels Jan 18, 2025
@mjpeet mjpeet added the Needs Review Participant to add when requesting review label Jan 18, 2025
@mjpeet mjpeet self-assigned this Jan 18, 2025
@cjyuan cjyuan added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jan 18, 2025
@@ -36,7 +36,7 @@ function getAngleType(angle) {
} else if (angle < 90) {
return "Acute angle";
// to get the obtuse angle
} else if (angle > 90 && angle < 180) {
} else if (90 < angle < 180) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test case doesn't work - can you check what happens if you use the condition angle > 90 && angle < 180 instead of 90 < angle < 180, and explain why does one work and the other doesn't?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition 90 < angle < 180 doesn't work in JavaScript because it evaluates 90 < angle first, resulting in a boolean (true or false), which is then compared to 180. JavaScript do nott support chained comparisons like Python.

@@ -32,3 +32,14 @@
// target output: false
// Explanation: The fraction 3/3 is not a proper fraction because the numerator is equal to the denominator. The function should return false.
// These acceptance criteria cover a range of scenarios to ensure that the isProperFraction function handles both proper and improper fractions correctly and handles potential errors such as a zero denominator.

function isProperFraction(Numerator, Denominator ){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The isProperFraction function is implemented correctly based on the provided instructions. The function handles all specified cases, including proper fractions, improper fractions, zero denominators, negative fractions, and equal numerators and denominators.

the assertions, or a test javascript file is missing, could you provide one?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have provided one and push the changes.

if (Math.abs(Numerator) < Math.abs(Denominator)) {
return true;
} else if (Denominator === 0){
return "Error";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zero Denominator Check: The current implementation returns the string "Error" when the denominator is zero. Instead, it should throw an error to properly handle this invalid case.

Order of Checks: The check for a zero denominator should be the first condition to ensure that invalid fractions are caught early.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have made the changes thanks

@mjpeet mjpeet removed their assignment Jan 20, 2025
@mjpeet mjpeet added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jan 20, 2025
@cjyuan cjyuan removed the Needs Review Participant to add when requesting review label Jan 20, 2025
@mjpeet
Copy link

mjpeet commented Jan 20, 2025

since this PR was hanging around quit a lot (the label "needs review" wasn't assigned, and the PR listing tool didn't pick it up), i'm just going to mention that you'll need to brush up on your git knowledge (the PR contains commits for previous tasks as well; however i checked later PRs, and this issue doesn't seem to be there, so there was improvement in how you manage adherence to the requirement where each submitted task needed to be based on a newly cloned repository)

@mjpeet
Copy link

mjpeet commented Jan 20, 2025

i will add the complete label, considering the shortage of time / this needing to be finished

@mjpeet mjpeet added the Complete Volunteer to add when work is complete and review comments have been addressed label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and review comments have been addressed 👀 Review Git Changes requested to do with Git Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants